package com.smooth.dao.gen;

import com.smooth.dao.gen.bean.BizJifenLog;
import com.smooth.dao.gen.bean.BizJifenLogExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface BizJifenLogMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_jifen_log
     */
    @SelectProvider(type=BizJifenLogSqlProvider.class, method="countByExample")
    long countByExample(BizJifenLogExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_jifen_log
     */
    @DeleteProvider(type=BizJifenLogSqlProvider.class, method="deleteByExample")
    int deleteByExample(BizJifenLogExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_jifen_log
     */
    @Delete({
        "delete from biz_jifen_log",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_jifen_log
     */
    @Insert({
        "insert into biz_jifen_log (id, user_id, ",
        "user_name, jifen_type, ",
        "jifen_type_name, jifen_amount, ",
        "jifen_amount_after, jifen_add_amount, ",
        "order_no, content, ",
        "opt_id, opd_name, ",
        "create_date, update_date)",
        "values (#{id,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, ",
        "#{userName,jdbcType=VARCHAR}, #{jifenType,jdbcType=SMALLINT}, ",
        "#{jifenTypeName,jdbcType=VARCHAR}, #{jifenAmount,jdbcType=INTEGER}, ",
        "#{jifenAmountAfter,jdbcType=INTEGER}, #{jifenAddAmount,jdbcType=INTEGER}, ",
        "#{orderNo,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, ",
        "#{optId,jdbcType=VARCHAR}, #{opdName,jdbcType=VARCHAR}, ",
        "#{createDate,jdbcType=TIMESTAMP}, #{updateDate,jdbcType=TIMESTAMP})"
    })
    int insert(BizJifenLog record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_jifen_log
     */
    @InsertProvider(type=BizJifenLogSqlProvider.class, method="insertSelective")
    int insertSelective(BizJifenLog record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_jifen_log
     */
    @SelectProvider(type=BizJifenLogSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="user_id", property="userId", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR),
        @Result(column="jifen_type", property="jifenType", jdbcType=JdbcType.SMALLINT),
        @Result(column="jifen_type_name", property="jifenTypeName", jdbcType=JdbcType.VARCHAR),
        @Result(column="jifen_amount", property="jifenAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="jifen_amount_after", property="jifenAmountAfter", jdbcType=JdbcType.INTEGER),
        @Result(column="jifen_add_amount", property="jifenAddAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="content", property="content", jdbcType=JdbcType.VARCHAR),
        @Result(column="opt_id", property="optId", jdbcType=JdbcType.VARCHAR),
        @Result(column="opd_name", property="opdName", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP)
    })
    List<BizJifenLog> selectByExample(BizJifenLogExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_jifen_log
     */
    @Select({
        "select",
        "id, user_id, user_name, jifen_type, jifen_type_name, jifen_amount, jifen_amount_after, ",
        "jifen_add_amount, order_no, content, opt_id, opd_name, create_date, update_date",
        "from biz_jifen_log",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="user_id", property="userId", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR),
        @Result(column="jifen_type", property="jifenType", jdbcType=JdbcType.SMALLINT),
        @Result(column="jifen_type_name", property="jifenTypeName", jdbcType=JdbcType.VARCHAR),
        @Result(column="jifen_amount", property="jifenAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="jifen_amount_after", property="jifenAmountAfter", jdbcType=JdbcType.INTEGER),
        @Result(column="jifen_add_amount", property="jifenAddAmount", jdbcType=JdbcType.INTEGER),
        @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="content", property="content", jdbcType=JdbcType.VARCHAR),
        @Result(column="opt_id", property="optId", jdbcType=JdbcType.VARCHAR),
        @Result(column="opd_name", property="opdName", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP)
    })
    BizJifenLog selectByPrimaryKey(String id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_jifen_log
     */
    @UpdateProvider(type=BizJifenLogSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") BizJifenLog record, @Param("example") BizJifenLogExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_jifen_log
     */
    @UpdateProvider(type=BizJifenLogSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") BizJifenLog record, @Param("example") BizJifenLogExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_jifen_log
     */
    @UpdateProvider(type=BizJifenLogSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(BizJifenLog record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table biz_jifen_log
     */
    @Update({
        "update biz_jifen_log",
        "set user_id = #{userId,jdbcType=VARCHAR},",
          "user_name = #{userName,jdbcType=VARCHAR},",
          "jifen_type = #{jifenType,jdbcType=SMALLINT},",
          "jifen_type_name = #{jifenTypeName,jdbcType=VARCHAR},",
          "jifen_amount = #{jifenAmount,jdbcType=INTEGER},",
          "jifen_amount_after = #{jifenAmountAfter,jdbcType=INTEGER},",
          "jifen_add_amount = #{jifenAddAmount,jdbcType=INTEGER},",
          "order_no = #{orderNo,jdbcType=VARCHAR},",
          "content = #{content,jdbcType=VARCHAR},",
          "opt_id = #{optId,jdbcType=VARCHAR},",
          "opd_name = #{opdName,jdbcType=VARCHAR},",
          "create_date = #{createDate,jdbcType=TIMESTAMP},",
          "update_date = #{updateDate,jdbcType=TIMESTAMP}",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(BizJifenLog record);
}